/*
 * @(#) $Header$
 *
 * Copyright (C) 2007  Forklabs Daniel Léonard
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */

package ca.forklabs.media.jai;

import java.awt.image.DataBuffer;

/**
 * Enum {@code FormatDataType} represents the possible values for the
 * <em>format</em> operation.
 *
 * @author   <a href="mailto:forklabs at gmail.com?subject=ca.forklabs.media.jai.FormatDataType">Daniel Léonard</a>
 * @version $Revision$
 */
public enum FormatDataType {

   /**
    * Represents the {@code byte} data type.
    */
   BYTE {
      /**
       * Gets the equivalent value from class {@link DataBuffer}.
       * @return   always {@link DataBuffer#TYPE_BYTE}.
       */
      @Override
      public int getDataBufferType() {
         int type = DataBuffer.TYPE_BYTE;
         return type;
         }
      },

   /**
    * Represents the {@code short} data type.
    */
   SHORT {
      /**
       * Gets the equivalent value from class {@link DataBuffer}.
       * @return   always {@link DataBuffer#TYPE_SHORT}.
       */
      @Override
      public int getDataBufferType() {
         int type = DataBuffer.TYPE_SHORT;
         return type;
         }
      },

   /**
    * Represents the {@code unsigned short} data type.
    */
   UNSIGNED_SHORT {
      /**
       * Gets the equivalent value from class {@link DataBuffer}.
       * @return   always {@link DataBuffer#TYPE_USHORT}.
       */
      @Override
      public int getDataBufferType() {
         int type = DataBuffer.TYPE_USHORT;
         return type;
         }
      },

   /**
    * Represents the {@code int} data type.
    */
   INTEGER {
      /**
       * Gets the equivalent value from class {@link DataBuffer}.
       * @return   always {@link DataBuffer#TYPE_INT}.
       */
      @Override
      public int getDataBufferType() {
         int type = DataBuffer.TYPE_INT;
         return type;
         }
      },

   /**
    * Represents the {@code float} data type.
    */
   FLOAT {
      /**
       * Gets the equivalent value from class {@link DataBuffer}.
       * @return   always {@link DataBuffer#TYPE_FLOAT}.
       */
      @Override
      public int getDataBufferType() {
         int type = DataBuffer.TYPE_FLOAT;
         return type;
         }
      },

   /**
    * Represents the {@code double} data type.
    */
   DOUBLE {
      /**
       * Gets the equivalent value from class {@link DataBuffer}.
       * @return   always {@link DataBuffer#TYPE_DOUBLE}.
       */
      @Override
      public int getDataBufferType() {
         int type = DataBuffer.TYPE_DOUBLE;
         return type;
         }
      };

   /**
    * Gets the equivalent value from class {@link DataBuffer}.
    * @return   the data type value.
    */
   public abstract int getDataBufferType();

   }
